package com.mjlf.mqzook.inter;

import com.alibaba.fastjson.JSONObject;
import com.mjlf.mqzook.entity.RegistryServer;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName RegistryFacotry
 * @Author mjlft
 * @Date 2020/2/18 12:16
 * @Version 1.0
 * @Description 服务注册方法
 */
public interface RegistryFacotry {
    Map<String, Set<RegistryServer>> servers = new ConcurrentHashMap<>(16);
    JSONObject registry(@RequestBody RegistryServer registryServer);
    JSONObject getServers();
}
